package com.kevin.chat.service.impl;

import com.kevin.chat.dao.UserDao;
import com.kevin.chat.entity.UserEntity;
import com.kevin.chat.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/*
 * 用户服务实现类
 * @author Kevin
 * @date 2021/1/13 16:34
 *
 */
@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private UserDao userDao;

    @Override
    public UserEntity register(UserEntity user) {
        return userDao.register(user);
    }

    @Override
    public UserEntity login(UserEntity user) {
        return userDao.login(user);
    }

    @Override
    public UserEntity getUserByLoginName(String loginName) {
        return userDao.getUserByLoginName(loginName);
    }
}
